Avoid python module statements with pytest mocks